package com.igeek.collateral.mapper;

import com.igeek.collateral.entity.Collateral;
import com.igeek.collateral.entity.Inbound;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 * 入库记录 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-07-04
 */
public interface InboundMapper extends BaseMapper<Inbound> {

//    @Select("update * from ibound ${ew.customSqlSegment}")
//    @Results({
//            @Result(id = true , column = "id" , property = "id"),
//            @Result(column = "id" , property = "roles" , javaType = Set.class ,
//                    one = @One(select = "com.igeek.collateral.mapper.collateralMapper.updateByCid"))
//    })
    //update inbound i,collateral c set c.name=#{collateral.name},c.address=#{collateral.address},c.code=#{collateral.code},i.date=#{io.date} where i.collateral_id=c.id and i.id=#{io.id}
    @Update("update * from ibound ${ew.sqlSet}")

    boolean updateMees(Inbound io, Integer collateralId);
}
